<%#
kind: PXELinux
name: PXELinux global default
model: ProvisioningTemplate
%>
<%# Used to boot unknown hosts, do not associate or change the name. %>

UI menu.c32
MENU TITLE Booting unknown host (ESC to stop)
TIMEOUT 200
ONTIMEOUT <%= global_setting("default_pxe_item_global", "local") %>
DEFAULT <%= global_setting("default_pxe_item_global", "local") %>

<%= snippet "pxelinux_chainload" %>

<%= snippet "pxelinux_discovery" %>

<% unless @profiles.nil? -%>
<% for profile in @profiles
  url = default_template_url(profile[:template], profile[:hostgroup])
  case profile[:pxe_type]
  when 'kickstart'
    append = "ks=#{url} ksdevice=bootif network kssendmac ks.sendmac inst.ks.sendmac"
  when 'preseed'
    locale = profile[:hostgroup].params['lang'] || 'en_US'
    append = "interface=auto url=#{url} ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=unassigned-hostname locale=#{locale} console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA"
  else
    raise("PXE type #{profile[:pxe_type]} not supported by template #{template_name}")
  end %>
LABEL <%= "#{profile[:hostgroup]} - #{profile[:template]}" %>
  KERNEL <%= profile[:kernel] %>
  APPEND initrd=<%= profile[:initrd] %> <%= append %>
<% end %>
<% end -%>
